<template>
  <div id="client">
    <p style="position: relative; right: 180px; scale: 0.8; width: 1700px">
      <span class="demonstration" style="margin-left: 20px">开票日期：</span>
      <el-date-picker
        v-model="value2"
        type="daterange"
        align="right"
        unlink-panels
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        :picker-options="pickerOptions"
      >
      </el-date-picker>
      &nbsp;&nbsp;&nbsp;
      <span class="demonstration" style="margin-left: 20px">单据日期：</span>
      <el-date-picker
        v-model="value2"
        type="daterange"
        align="right"
        unlink-panels
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        :picker-options="pickerOptions"
      >
      </el-date-picker>
      &nbsp;&nbsp;&nbsp; 单据编号：<el-input
        style="width: 180px; margin-left: 10px; margin-right: 20px"
        placeholder="单据编号"
        v-model="input"
        clearable
      >
      </el-input>
       </p>
      <p style="position: relative; right: 180px; scale: 0.8; width: 1700px">
      &nbsp;&nbsp;&nbsp;供应商：<el-input
        style="width: 180px; margin-left: 10px; margin-right: 20px"
        placeholder="请选择"
        v-model="input"
        clearable
      ></el-input>
      <el-button
        style="margin-left: -20px; margin-right: 10px"
        @click="dialogFormVisible = true"
        >...</el-button
      >
      &nbsp;&nbsp;&nbsp; 业务员<el-input
        style="width: 180px; margin-left: 10px; margin-right: 20px"
        placeholder="请选择"
        v-model="input"
        clearable
      ></el-input>
      <el-button
        style="margin-left: -20px; margin-right: 10px"
        @click="dialogFormVisible = true"
        >...</el-button
      ><el-button type="primary">查询</el-button>
</p>
   <el-divider></el-divider>
<div style="float: right; margin-bottom: 10px">
      &nbsp;&nbsp;&nbsp;
      <el-button>导出</el-button>
      <el-button type="danger">删除</el-button>
</div>
    <el-table
      height="400px"
      :data="tableData"
      border
      style="width: 100%; font-size: 13px"
      show-summary
    >
    <el-table-column type="selection" width="55"> </el-table-column>
      <el-table-column prop="opendate" label="开票日期" width="120">
      </el-table-column>
      <el-table-column prop="thisId" label="发票号" width="120">
      </el-table-column>
      <el-table-column prop="head" label="发票抬头" width="120">
      </el-table-column>
      <el-table-column prop="date" label="单据日期" width="150">
      </el-table-column>
      <el-table-column prop="ordersId" label="单据编号" width="120">
      </el-table-column>
      <el-table-column prop="orderId" label="关联购货订单号" width="120">
      </el-table-column>
      <el-table-column prop="client" label="供应商" width="120">
      </el-table-column>
      <el-table-column prop="doman" label="制单人" width="120">
      </el-table-column>
      <el-table-column prop="dodate" label="制单日期" width="120">
      </el-table-column>
      <el-table-column prop="totalmoney" label="金额" width="120">
      </el-table-column>
      <el-table-column prop="tax" label="税率" width="120"> </el-table-column>
      <el-table-column prop="taxmoney" label="价税合计" width="120">
      </el-table-column>
      <el-table-column prop="getMoney" label="已付款" width="120">
      </el-table-column>
      <el-table-column prop="getMoneystatus" label="付款状态" width="120">
      </el-table-column>
      <el-table-column prop="piaoMoney" label="开票金额" width="120">
      </el-table-column>
      <el-table-column prop="mytext" label="备注" width="120">
      </el-table-column>
      <el-table-column fixed="right" label="操作" width="100">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small"
            >查看</el-button
          >
          <el-button type="text" size="small">编辑</el-button>
          <el-button type="text" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <el-pagination style="position: absolute;left: 700px;" @size-change="handleSizeChange"
      @current-change="handleCurrentChange" :current-page="currentPage4" :page-sizes="[100, 200, 300, 400]"
      :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="400">
    </el-pagination>
   
    <el-dialog top="20px" title="新增客户" :visible.sync="dialogFormVisible">
      <AddClient />
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false"
          >确 定</el-button
        >
      </div>
    </el-dialog>
    <div style="height: 20px; clear: both"></div>
    <el-dialog top="20px" title="添加发票" :visible.sync="dialogFormVisible">
      <el-input
        v-model="input"
        placeholder="请输入编号或名称"
        style="width: 200px; margin-left: 20px"
      ></el-input>
      <el-checkbox v-model="checked" style="margin-left: 20px"
        >显示禁用职员</el-checkbox
      >
      <el-button type="success" style="margin-left: 20px">查询</el-button>
      <el-table :data="gridData" show-summary>
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column
          width="100"
          property="name"
          label="类别"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="编号"
        ></el-table-column>
        <el-table-column
          width="300"
          property="address"
          label="名称"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="联系人"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="手机"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="备注"
        ></el-table-column>
      </el-table>
      <div class="block">
        <span class="demonstration"></span>
        <el-pagination layout="prev, pager, next" :total="1000">
        </el-pagination>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "InvoicingList",
  data() {
    return {
      goto(to) {
        if (this.$route.path !== "/" + to) {
          this.$router.push(to);
        }
      },
      tableData: [
      {
        opendate: '2024-12-01',
        domoney: 1000.00,
        thisId: 'INV001',
        head: 'ABC公司',
        date: '2024-12-01',
        ordersId: 'OD001',
        orderId: 'PO001',
        client: '供应商X',
        doman: '张三',
        dodate: '2024-12-01 10:00:00',
        totalmoney: 1000.00,
        tax: '13%',
        taxmoney: 1130.00,
        getMoney: 500.00,
        getMoneystatus: '部分支付',
        piaoMoney: 1000.00,
        mytext: '无'
      },
      {
        opendate: '2024-12-02',
        domoney: 2000.00,
        thisId: 'INV002',
        head: 'XYZ公司',
        date: '2024-12-02',
        ordersId: 'OD002',
        orderId: 'PO002',
        client: '供应商Y',
        doman: '李四',
        dodate: '2024-12-02 11:30:00',
        totalmoney: 2000.00,
        tax: '13%',
        taxmoney: 2260.00,
        getMoney: 1000.00,
        getMoneystatus: '未支付',
        piaoMoney: 2000.00,
        mytext: '请尽快支付'
      },
      // 更多数据...
    ],
      dialogFormVisible: false,
      gridData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
      ],
      value2: "",
    };
  },
  methods: {
    goto(to) {
      this.$router.push(to);
    },
  },
};
</script>

<style scoped>
.el-button el-button--default el-popover__reference {
  margin-right: 20px;
}

tr {
  border: 1px solid black;
}
</style>